<html>
  <title>WebGPU canvas_composite_alpha_premultiplied (ref)</title>
  <meta charset="utf-8" />
  <link rel="help" href="https://gpuweb.github.io/gpuweb/" />
  <style>
    body { background-color: #F0E68C; }
  </style>
  <canvas id="cvs" width="4" height="4" style="width: 20px; height: 20px;"></canvas>
  <script>
    const ctx = cvs.getContext('2d');
    ctx.globalAlpha = 0.5;
    ctx.fillStyle = '#7F0000';
    ctx.fillRect(0, 0, 3, 3);
    ctx.fillStyle = '#007F00';
    ctx.fillRect(1, 0, 3, 3);
    ctx.fillStyle = '#00007F';
    ctx.fillRect(0, 1, 3, 4);
    ctx.fillStyle = '#7F7F00';
    ctx.fillRect(1, 1, 4, 4);
  </script>
</html>
